const Controller = require('egg').Controller;
class UserController extends Controller {
  async info() {
    const userId = this.ctx.params.id;
    const userInfo = await this.ctx.service.user.find(userId);
    this.ctx.body = userInfo;
  }
  // 读取数据库中user信息
  async info1() {
    const userInfo = await this.ctx.service.user.findById('1');
    this.ctx.body = userInfo;
  }
}
module.exports = UserController;
